
$b=$("body");
// Y_Move,Y_Tab,Y_Anchors
// 顶部切换Class
!function(e){var n=function(n){var o=w.scrollTop()>(e(".TopLine").length?e(".TopLine").offset().top:1);e(".subpage").length&&(o=!0),void 0!=n&&(e(".nav .bg").Y_SetCss3({dur:"0ms"}),setTimeout(function(){e(".nav .bg").removeAttr("style")},1)),o?e(ysq.wrap).addClass("fixedNav"):e(ysq.wrap).removeClass("fixedNav")};w.on("scroll.navC",function(){n()}),n(0)}(jQuery);
// setSubPage
!function(t){!function(i){if(i.length){t(".TopLine");var e=t(".BottomLine");i.css("min-height",function(){return t(this).css("min-height")||0}),t(ysq.wrap).outerHeight()<w.height()&&i.css({"min-height":w.height()-(void 0==ysq._dpr?ptb(i,0)+ptb(i,1):0)-i.offset().top-(t(ysq.wrap).outerHeight()-e.offset().top)})}}(t(".subpage"))}(jQuery);
// banner
! function(n) {
    function t(n) {
        return n < 10 && (n = "0" + n), n
    }
    jQuery(".banner").Y_Move({
        duration: 1500,
        resizable: !1,
        fullscreen: !0,
        evenWidth: !0,
        transparent: !0,
        itemInit: !0,
        slidable: !1,
        IsIcon: !1,
        IsDrag: !0,
        oddEven: !0,
        InOut: !0,
        TimeOut: 4,
        synchro: !0,
        fn: {
            after: function(n, e, i) {
                n.find(".nums b").text(t(e.length))
            },
            start: function(n, e, i, r, u, s, s, a) {
                n.find(".nums i").text(t(i + 1))
            }
        }
    })
}();

jQuery(document).ready(function() {
    //video
    ;(function($){
        if(!$('video').length){return;}
        var bCanPlay=!!$('video')[0].canPlayType;
        if($(".vd-box .btn.play").not(".videoPlay").length){
            $(".vd-box .btn.play").click(function(e) {
                $(this).parents('.vd-box').find('.video').show(0,function(){
                    bCanPlay&&$(this)[0].play();
                });
            });
        }else if($(".videoPlay").length){
            $("#videoWindow").Y_Modal({sTrigger:$(".videoPlay"),fn:{
                callback:function($this,$Tg){
                    $("video",$this)[0].src=$Tg.attr("video-src");
                    bCanPlay&&$("video",$this)[0].play();
                },funno:function($this){
                    $("video",$this)[0].src=" ";
                    bCanPlay&&$("video",$this)[0].pause();
                }}
            });
        }
    })(jQuery);
    ! function(t) {
        function e() {
            i[0].Y_Timer = setTimeout(function() {
                i.removeClass("show"), r.length ? onoff(r) : n.removeClass("on")
            }, 200)
        }
        var n, a = t(".nav"),
            i = t(".secNavBox"),
            o = t(".box", i),
            s = t(".searchBox"),
            r = t(".firItem.on", a);
        a.hover(function(t) {
            clearTimeout(a[0].Y_Timer), a.addClass("active")
        }, function(t) {
            a[0].Y_Timer = setTimeout(function() {
                a.removeClass("active")
            }, 320)
        }), t(".firItem", a).hover(function() {
            var e = t(this).index();
            onoff(t(this)), o.eq(e).children().length > 0 && (clearTimeout(i[0].Y_Timer), i.addClass("show"), onoff(o.eq(e)))
        }, function() {
            n = t(this), e()
        }), i.hover(function(t) {
            clearTimeout(i[0].Y_Timer)
        }, function() {
            e()
        }), /*t(".nav .secNavBox .secNav").Y_HoverOn({
            item: ".secItem"
        }),*/ s.on("mouseenter", function(e) {
            t(this).addClass("active"), s.addClass("show"), t(".skin", s).focus()
        }).on("mouseleave", function(e) {
            t(this).removeClass("active"), s.removeClass("show")
        }).delegate(".enter", "click", function(e) {
            if (s.hasClass("active")) {
                var n = t(".skin", s);
                if (n.removeClass("red"), isNull(n.val())) return n.parent().addClass("red"), n.focus(), prevent_default(e)
            }
        })
    }(jQuery), jQuery(".iService-Slide").Y_Move({
            slideBox: !0,
            MinNum: 6,
            lazyLoad: [!0, 100],
            IsDrag: !0,
            instant: !0
        }),
        function(t) {
            w.on("scroll.numCount", function(e) {
                ysq.shutDown || t(".numCountUp").each(function(e, n) {
                    if (inWindow(t(n)) && !t(n).hasClass("bindedFn")) {
                        var a = new CountUp(n, t(n).attr("data-startVal") || 0, t(n).attr("data-endVal"), 0, 2.5);
                        setTimeout(function() {
                            a.start()
                        }, 200 + parseInt(t(n).attr("data-delay")) || 0), t(n).addClass("bindedFn")
                    }
                })
            }).trigger("scroll.numCount")
        }(jQuery), jQuery(".news-Tab").Y_Tab({
            event:"mouseenter",
            lazyLoad: [!0, 100]
        }),
        function(t) {
            t("[data-lct]").mouseenter(function(e) {
                var n = t(this).attr("data-lct");
                t("[data-tlct=" + n + "]").find(".ico").Y_Animation({
                    animation: "AniOpStriking"
                })
            }), t("[data-tlct]").mouseenter(function(e) {
                var n = t(this).attr("data-tlct");
                t("[data-lct=" + n + "]").Y_Animation({
                    animation: "AniOpStriking"
                })
            })
        }(jQuery), jQuery(".sBusiness-Section2-Tab").Y_Tab({event:"mouseenter",lazyLoad:[!0,100]}),
        function(t) {
            t(".L2_Nav .firItem.on");
            t(".L2_Nav .link").siblings(".ctr").click(function(e) {
                var n = t(this);
                if (n.siblings(".Tt").length) {
                    var a = n.parents(".firItem");
                    n.siblings(".secNav");
                    return a.hasClass("on") ? a.removeClass("active on").find(".Tt").stop(!0, !0).slideUp(300, function() {}) : (a.addClass("active on").find(".Tt").stop(!0, !0).slideDown(300), a.siblings(".firItem").removeClass("active on").find(".Tt").slideUp(300)), prevent_default(e)
                }
            })
        }(jQuery),
        function(t) {
            t(".qa-List,.hr-List").delegate(".show", "click", function(e) {
                var n = t(this).parents(".item"),
                    a = t(this).find(".btn span");
                a.length && ("展开全部信息" == a.text() ? a.text("收起全部信息") : a.text("展开全部信息")), n.hasClass("unfold") ? n.removeClass("unfold").find(".hide").slideUp(200) : n.addClass("unfold").find(".hide").slideDown(200)
            })
        }(jQuery),
        function(t) {
            var e = "#ajaxList";
            if (t(e).length) {
                var n = !0,
                    a = parseInt(t(e).attr("pageNum")) || 1,
                    i = 0,
                    o = {
                        do: "MORE+",
                        ing: "加载中",
                        done: "已加载全部",
                        redo: "请点击重试",
                        timeout: "请求超时，请点击重试"
                    },
                    s = function(s, l) {
                        n && t.ajax({
                            url: s,
                            type: "POST",
                            dataType: "HTML",
                            timeout: 5e3,
                            beforeSend: function() {
                                r(!!l, o.ing, 1), i = (new Date).getTime()
                            },
                            success: function(n, c, d) {
                                var u = 500 - ((new Date).getTime() - i);
                                setTimeout(function() {
                                    t(n).find(e).children(".item").length ? (a = Number(s.match(/\d+/)[0]), t(e).attr("pageNum", a), t(e).append(t(n).find(e).html()), fnScrollElePd(t(e)) && (t.fn.Y_ScrollEle.Init(t(e)), t.fn.Y_ScrollEle.Do(t(e), 0, !0)), t.fn.Y_LazyLoad.Init && t.fn.Y_LazyLoad.Init(t(e)), isNull(t(e).data("callback")) || t(e).data("callback")(), t(e).children(".item").length % (t(e).attr("pageSize") || 8) == 0 ? r(!0, o.do, 3) : r(!1, o.done, 2), r(!0, o.do, 3), !!l || history.pushState && history.pushState({
                                        page: s
                                    }, "", s)) : r(!1, o.done, 2), ysq.Switch && t(e).find("[scrollEle]").length && t.fn.Y_ScrollEle.Do()
                                }, u < 1 ? 1 : u)
                            },
                            error: function(t, e, n) {
                                var a = 500 - ((new Date).getTime() - i);
                                setTimeout(function() {
                                    "Not Found" == n ? r(!1, o.done, 2) : "timeout" == n ? r(!0, o.timeout, 3) : r(!0, o.redo, 3)
                                }, a < 1 ? 1 : a)
                            }
                        })
                    },
                    r = function(e, i, o) {
                        switch (o) {
                            case 1:
                                t("#loadState").attr("class", "ing");
                                break;
                            case 2:
                                t("#loadState").attr("class", "off").removeAttr("nextPage").off("click.retry").one("click.off", function(e) {
                                    t(this).Y_Animation({
                                        animation: "headShake"
                                    })
                                });
                                break;
                            case 3:
                                t("#loadState").attr("class", "retry").attr("nextPage", a + 1).off("click.off").one("click.retry", function(e) {
                                    t(this).Y_Animation({
                                        animation: "AnflashOver"
                                    })
                                });
                                break;
                            default:
                                ysq.TT && cw("使用方法错误")
                        }
                        n = e, t("#loadState").text(i)
                    };
                w.load(function() {
                    if (t("#loadState").length || t(e).after('<div id="loadState" class="ing" nextPage=' + (a + 1) + "></div>"), !t(e).children(".item").length || t(e).children(".item").length % (t(e).attr("pageSize") || 8) != 0) return t("#loadState").hide(), !1;
                    r(!0, o.do, 3), $b.delegate("#loadState", TouchEd, function(e) {
                        s("index_" + t(this).attr("nextPage") + ".html")
                    }), "onpopstate" in window && window.addEventListener("popstate", function(t) {
                        s(location.href.match(/[^\/]+$/)[0], !0)
                    })
                })
            }
        }(jQuery)
});
